package com.yonyou.crm.cum.cumprmt.rmimpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yonyou.crm.common.page.entity.Page;
import com.yonyou.crm.cum.cumprmt.entity.CumprmtVO;
import com.yonyou.crm.cum.cumprmt.rmitf.ICumprmtRmService;
import com.yonyou.crm.cum.cumprmt.service.CumprmtBizServiceImpl;
import com.yonyou.iuap.context.InvocationInfoProxy;

@Service("cumprmtService")
public class CumprmtRmServiceImpl implements ICumprmtRmService {

	@Autowired
	private CumprmtBizServiceImpl service;

	@Override
	public Page<CumprmtVO> list(Page<CumprmtVO> page,
			Map<String, Object> paraMap) {
		return service.getCumprmtList(page, paraMap);
	}
	
	@Override
	public CumprmtVO detail(Long id) {
		// TODO 自动生成的方法存根
		return null;
	}

	@Override
	public CumprmtVO save(CumprmtVO vo) {
		return service.saveVO(vo);
	}

	@Override
	public CumprmtVO update(CumprmtVO vo) {
		return service.updateVO(vo);
	}

	@Override
	public Page<CumprmtVO> batchDelete(String[] ids, Page<CumprmtVO> page,
			Map<String, Object> paraMap) {
		// TODO 自动生成的方法存根
		return null;
	}
	
	/*
	 * 提交审批
	 */
	@Override
	public void submit(Long cumId) {
		service.submit(cumId);
	}
	/**
	 * 获取客户相关客户升级申请单
	 */
	@Override
	public List<CumprmtVO> getRelCumprmtList(Map<String, Object> paraMap) {
		// TODO 自动生成的方法存根
		paraMap.put("tenantId", Long.parseLong(InvocationInfoProxy.getTenantid()));
		return service.selectCumprmtByCumId(paraMap);
	}
	
}
